import time
from selenium import webdriver
from selenium.webdriver.common.by import By
from selenium.webdriver.common.action_chains import ActionChains
from selenium.webdriver.common.keys import Keys

# 酒仙网 首页输入框 输入文本 鼠标双击 回车 切换
driver=webdriver.Edge()
driver.maximize_window()
driver.get('https://www.jiuxian.com/')

# 输入框
search=driver.find_element(By.ID,'wd')

# 搜索五粮液
search.send_keys("五粮液")
time.sleep(3)

# 回车
search.send_keys(Keys.ENTER)
time.sleep(3)

search2=driver.find_element(By.ID,'wd')
# 鼠标双击
ActionChains(driver).double_click(search2).click(search2).perform()
time.sleep(3)
search2.send_keys(Keys.CONTROL,'x')
time.sleep(3)
input2=driver.find_element(By.XPATH,'//*[@id="minPrice"]')
time.sleep(3)
input2.send_keys(Keys.CONTROL,'v')
time.sleep(3)
input2.send_keys(Keys.CONTROL,'v')
time.sleep(5)

# 双击
# ActionChains(driver).double_click(search).perform()
# time.sleep(3)